<?
//Processes 0.0.1
class processes{
    private $proc;
    function __construct(){
        $this->proc=array();
    }
    function add($pocess, $privilege){
        if(!isset($this->proc[$privilege])||!is_array($this->proc[$privilege])) $this->proc[$privilege]=array();
        $this->proc[$privilege][]=$pocess;
    }
    function run(){
        foreach($this->proc as $val){
            if(is_array($val)) foreach($val as $p){
                if($p!=""){
                    include_once('processes/'.$p.'.prc.php');
                    $prc_name='prc_'.$p;
                    $current=new $prc_name();
                }
            }
        }
    }
}
?>